<template>
	<view>
		<status-bar :title="title"></status-bar>
		<view class="Wrapper">
			<u-parse :content="pageData.website_article_content" :domain="imgUrl"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgUrl: this.imgUrl,
				title: '',
				article_id: '',
				pageData: '',
			};
		},
		onLoad(opt) {
			if (opt.id) this.article_id = opt.id;
			this.articleInfo();
		},
		methods: {
			articleInfo() {
				this.$http
					.post({
						url: '/zzjApp/articleInfo',
						data: {
							website_article_id: this.article_id,
						},
					})
					.then((res) => {
						if (res.errcode != '00000') return this.$Toast(res.msg);
						const result = res.data;
						this.$BarTitle(result.website_article_title);
						this.title = result.website_article_title;
						this.pageData = result;
					});
			},
		},
	};
</script>

<style lang="scss" scoped>
	.Wrapper {
		width: 710rpx;
		margin: 20rpx auto;
	}
</style>
